package com.jdd.enterprise.mycommon;


import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class BasicException extends RuntimeException {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String errorCode = BasicRespCode.FAIL.code;
    private String errorMsg = BasicRespCode.FAIL.desc;

    public BasicException() {
        super();
    }

    public BasicException(String errorMsg) {
        super(errorMsg);
        this.errorMsg = errorMsg;
    }

    public BasicException(String errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public BasicException(BasicRespCode basicRespCode) {
        super(basicRespCode.desc);
        this.errorCode = basicRespCode.code;
        this.errorMsg = basicRespCode.desc;
    }
}
